<?php
/*
 * 用户model文件
 */
include DOCMENT_ROOT.'/Framework/model.class.php';
class adminModel extends model{
   public function __construct(){
       parent::connectMysqlDB("school");
    }
   /*
    * 登录查询记录
    */
   public function login($name,$pwd) {
     $sql = "select count(*) as num from admin where name='$name' and pwd = '$pwd' ";
     $result = $this->mysql->login($sql);
        if(!empty($result)) {
            return true;
        }else{
        return false;
        }
    }
}
